import java.awt.GridLayout;

import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JPanel;



public class Vue extends JFrame{
	private JFileChooser fc;

	public Vue(ControlleurVue ctrlV){
		initialiser(ctrlV);
	}

	/**
	 * @param ctrlV
	 */
	private void initialiser(ControlleurVue ctrlV) {
		GridLayout gl = new GridLayout();
		gl.setColumns(2);
		gl.setRows(2);
		gl.setHgap(2);
		gl.setVgap(2);
		
		JPanel pan = new JPanel();
		pan.setLayout(gl);
		
		JButton btnAjout = new JButton("Ajouter");
		btnAjout.setActionCommand("Ajout");
		btnAjout.addActionListener(ctrlV);
		
		JButton btnSupprimer = new JButton("Supprimer");
		JButton btnModifier = new JButton("Modifier");
		
		fc = new JFileChooser("127.0.0.1:J:\\RepServer2");
	
	
		
		pan.add(btnAjout);
		pan.add(btnSupprimer);
		pan.add(btnModifier);
		
		this.setContentPane(pan);
		this.setTitle("Client");
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		this.setVisible(true);
		
	}
	public JFileChooser getFc() {
		return fc;
	}

	public void setFc(JFileChooser fc) {
		this.fc = fc;
	}
}
